# content of conftest.py
import sys
import pytest

from test_foocompate import Foo

sys.dont_write_bytecode = True


def pytest_assertrepr_compare(op, left, right):
    if isinstance(left, Foo) and isinstance(right, Foo) and op == "==":
        return ['Comparing Foo instances:', '   vals: %s != %s' % (left.val, right.val)]


def pytest_configure():
    pytest.register_assert_rewrite('utils')
